import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '创建人',
    align: "center",
    dataIndex: 'createBy'
  },
  {
    title: '创建日期',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '更新人',
    align: "center",
    dataIndex: 'updateBy'
  },
  {
    title: '更新日期',
    align: "center",
    dataIndex: 'updateTime'
  },
  {
    title: '所属品牌',
    align: "center",
    dataIndex: 'brand'
  },
  {
    title: '产品名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '配料表',
    align: "center",
    dataIndex: 'ingredients'
  },
  {
    title: '规格',
    align: "center",
    dataIndex: 'specifications'
  },
  {
    title: '条码',
    align: "center",
    dataIndex: 'barcode'
  },
  {
    title: '图片',
    align: "center",
    dataIndex: 'image',
    customRender: render.renderImage,
  },
  {
    title: '价格',
    align: "center",
    dataIndex: 'price'
  },
  {
    title: '保质期',
    align: "center",
    dataIndex: 'shelfLife'
  },
  {
    title: '食用方法',
    align: "center",
    dataIndex: 'eat'
  },
  {
    title: '储存方法',
    align: "center",
    dataIndex: 'storageMethod'
  },
  {
    title: '核心卖点',
    align: "center",
    dataIndex: 'sellingPoints'
  },
  {
    title: '禁忌',
    align: "center",
    dataIndex: 'taboos'
  },
  {
    title: '品牌实力',
    align: "center",
    dataIndex: 'brandStrength'
  },
  {
    title: '功效',
    align: "center",
    dataIndex: 'effects'
  },
];

// 高级查询数据
export const superQuerySchema = {
  createBy: {title: '创建人',order: 0,view: 'text', type: 'string',},
  createTime: {title: '创建日期',order: 1,view: 'datetime', type: 'string',},
  updateBy: {title: '更新人',order: 2,view: 'text', type: 'string',},
  updateTime: {title: '更新日期',order: 3,view: 'datetime', type: 'string',},
  brand: {title: '所属品牌',order: 4,view: 'text', type: 'string',},
  ingredients: {title: '配料表',order: 5,view: 'textarea', type: 'string',},
  specifications: {title: '规格',order: 6,view: 'text', type: 'string',},
  barcode: {title: '条码',order: 7,view: 'text', type: 'string',},
  image: {title: '图片',order: 8,view: 'image', type: 'string',},
  price: {title: '价格',order: 9,view: 'number', type: 'number',},
  shelfLife: {title: '保质期',order: 10,view: 'text', type: 'string',},
  eat: {title: '食用方法',order: 11,view: 'textarea', type: 'string',},
  storageMethod: {title: '储存方法',order: 12,view: 'textarea', type: 'string',},
  sellingPoints: {title: '核心卖点',order: 13,view: 'textarea', type: 'string',},
  taboos: {title: '禁忌',order: 14,view: 'textarea', type: 'string',},
  brandStrength: {title: '品牌实力',order: 15,view: 'textarea', type: 'string',},
  effects: {title: '功效',order: 16,view: 'textarea', type: 'string',},
};
